var path = require('path');

var fs = require('fs');

var moduleFileExtensions = ['web.mjs', 'mjs', 'web.js', 'js', 'web.ts', 'ts', 'web.tsx', 'tsx', 'json', 'web.jsx', 'jsx', 'vue']; // Resolve file paths in the same order as webpack

var resolveModule = function resolveModule(filePath) {
  var extension = moduleFileExtensions.find(function (extension) {
    return fs.existsSync("".concat(filePath, ".").concat(extension));
  });

  if (extension) {
    return "".concat(filePath, ".").concat(extension);
  }

  return "".concat(filePath, ".js");
};

var publicPath = path.resolve(__dirname, '../public');
var rootEntryFile = path.resolve(__dirname, './entry/root/index');
var moduleEntryFile = path.resolve(__dirname, './entry/module/index');
var moduleMsEntryFile = path.resolve(__dirname, './entry/module/getRouterData');
module.exports = {
  publicPath: publicPath,
  rootEntryFile: resolveModule(rootEntryFile),
  moduleEntryFile: resolveModule(moduleEntryFile),
  moduleMsEntryFile: resolveModule(moduleMsEntryFile)
};